import java.util.Arrays;

public class Find {
    public static int findNum(int[] array){
        int ret = array[0];
        for (int i = 1; i < array.length; i++) {
            ret ^= array[i];
        }
        return ret;
    }

    public static void main(String[] args) {
        int[] arr = {1,2,3,3,1};
        int ret = findNum(arr);
        System.out.println(ret);
    }
}
